<!-- 继承公共的 form -->
{{extend name="public/module/detail" /}}

<!-- 重写数据模块 -->
{{block name="detail_data"}}
    <!-- 父级内容 -->
    {__block__}
    
    <!-- 地图 -->
    <div class="am-panel am-panel-default">
        <div class="am-panel-hd">地图</div>
        <div class="am-panel-bd">
            {{if !empty($data['lng']) and !empty($data['lat'])}}
                <div id="map" data-level="17" class="am-margin-top-xs"></div>
            {{else /}}
                <div class="table-no"><i class="am-icon-warning"></i> 未配置</div>
            {{/if}}
        </div>
    </div>
{{/block}}

<!-- 底部内容重写 -->
{{block name="form_page_bottom"}}
    <script type="text/javascript">
    $(function()
    {
        // 百度地图初始化
        MapInit({{if !empty($data['lng'])}}{{$data['lng']}}{{else /}}116.400244{{/if}},{{if !empty($data['lat'])}}{{$data['lat']}}{{else /}}39.92556{{/if}}, null, null, false);
    });
    </script>
{{/block}}